package com.tpp.scheduler.client;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tpp.comm.client.TaskClient;
import com.tpp.comm.pojo.TpTask;
import com.tpp.scheduler.mapper.TaskMapper;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TaskClientImpl implements TaskClient {

    @Resource
    private TaskMapper taskMapper;

    @Override
    public TpTask findByOrderNo(String orderNo) {
        TpTask task = taskMapper.selectOne(new LambdaQueryWrapper<TpTask>().eq(TpTask::getOrderNo,orderNo));
        return task;
    }
}
